<HTML><HEAD><TITLE>symbols_domain_indices(+Xs, ?Domain, -Is)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_symbolic)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>symbols_domain_indices(+Xs, ?Domain, -Is)</H1>
Map symbolic domain variables/values to integer variables/values
<DL>
<DT><EM>Xs</EM></DT>
<DD>list of domain variables or values
</DD>
<DT><EM>Domain</EM></DT>
<DD>Variable or domain name
</DD>
<DT><EM>Is</EM></DT>
<DD>Variable, will be bound to list of integers or integer variables
</DD>
</DL>
<H2>Description</H2>
<P>
	Low-level primitive:
	For a list of domain variables or domain values, return the
	domain name and a list of integers or integer variables reflecting
	the corresponding integer index within the domain order.
	If the domain name is instantiated at call time, the list elements
	will be checked to be all from this domain.
	</P><P>
	An error will be reported if not all list elements come from the same
	domain. If the list contained domain-less variables, then, as a side
	effect, these will be given a domain to be compatible with the other
	list elements.
	</P>

<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
X is neither a symbolic domain variable nor a domain constant
<H2>Examples</H2>
<PRE>
    ?- symbols_domain_indices([we], D, Is).
    D = eclipse:weekday
    Is = [3]
    Yes (0.00s cpu)
    
    ?- X &amp;:: weekday, symbols_domain_indices([X], D, Is).
    X = X{[mo, tu, we, th, fr, sa, su]}
    D = weekday
    Is = [X_ic{1 .. 7}]
    Yes (0.00s cpu)

    ?- X &amp;:: weekday, symbols_domain_indices([X, Y, we], D, Is).
    X = X{[mo, tu, we, th, fr, sa, su]}
    Y = Y{[mo, tu, we, th, fr, sa, su]}
    D = eclipse:weekday
    Is = [X_ic{1 .. 7}, X_ic{1 .. 7}, 3]
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/ic_symbolic/symbol_domain_index-3.html">symbol_domain_index / 3</A>, <A HREF="../../lib/ic_symbolic/YNN-2.html">&:: / 2</A>, <A HREF="../../kernel/termcomp/domain-1.html">domain / 1</A>
</BODY></HTML>
